sync push
ローカルファイルを Cosense にアップロードします。
書式
cos sync push [<title>] [--all] [--dir <path>] [--retries <n>] --project <name>
フラグ
[<title>] — 対象ページタイトル (--all と排他)
--all — ローカルディレクトリ内の全ページを対象
--dir <path> — ローカルディレクトリ (デフォルト: カレントディレクトリ)
--format <fmt> — ファイル形式 (現在 txt のみ)
--retries <n> — 楽観ロック 競合時のリトライ回数 (デフォルト: 0) --dry-run — 実際の書き込みをスキップして確認
使用例
code:bash
# 単一ページを push
cos sync push "ページタイトル" --dir ./sync --project myproject
# 全ページを push
cos sync push --all --dir ./sync --project myproject
# 競合時に 3 回リトライ
cos sync push "ページタイトル" --dir ./sync --retries 3 --project myproject
競合時 (exit 6) の対処
code:bash
cos sync pull "ページタイトル" --dir ./sync --project myproject
# ローカルで内容を確認・マージ後
cos sync push "ページタイトル" --dir ./sync --project myproject
関連ページ